#pragma once

#include <cstddef>
#include <stdint.h>
#include <vector>

namespace hawking {
namespace indexlib {

class IndexDocument {
public:
    IndexDocument() = default;
    ~IndexDocument() = default;

    void CreateField(int32_t field_id, uint64_t token);
    bool GetField(int32_t field_id, uint64_t* term_key);

    void SetPrimaryKey(uint64_t pk) {
        pk_ = pk;
    }

    uint64_t PrimaryKey() const {
        return pk_;
    }

private:
    std::vector<uint64_t> fields_termkeys_;
    uint64_t pk_;
};

}
}